package final2107.night.day08;

public class Flower {
    public static void main(String[] args) {
        for (int i=100;i<1000;i++){
            isFlower(i);
        }
    }
    //定义方法判断值是否为水仙花数
    public static void isFlower(int m){
        int n=m;
        int sum = 0; //保存立方之和
        while (n>0){
            int x = n%10;
            sum += x*x*x;
            n/=10;
        }
        if (sum==m){
            System.out.println(m);
        }
    }
}
